package com.atming.zuul.service.impl;

import com.atming.zuul.pojo.Order;
import com.atming.zuul.service.OrderService;
import com.atming.zuul.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;


@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private ProductService productService;

    @Override
    public Order selectOrderById(Long id) {
        return new Order(id,"order-001","中国",5119541D,
                Arrays.asList(productService.selectProductById(id)));
    }
}
